<?php session_start();?>

<?php if(isset($_SESSION['user'])){ ?> 
<html>
<head>
<title>Payment Reciept</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
	font-family: Cambria;
	color: #000080;
}
.style2 {color: #000099}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Untitled-1) -->
<table width="620" height="250" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
	<tr>
		<td><table width="620" height="100" border="0">
          <tr height="10%">
            <td><div align="center">
              <h1 class="style1">NAWODYA INSTITUTE (PVT) LTD </h1>
            </div></td>
          </tr>
          <tr height="10%">
            <td bgcolor="#FFFFFF"> <div align="center" class="style2">No: 66/12, <br>Yatiyanthota road,<br>Awissawella. </div></td>
          </tr>
          <tr>
            <td><div align="center" class="style2">Tel : 036-2230454/Fax : 94-3-2687014<br>Email : avinavodaya@gmail.com</div></td>
          </tr>
		  
          <tr>
            <td height="3"><img src="images/report_04.png" width="620" height="8"></td>
          </tr>
        </table></td>
	</tr>
	<tr>
		<td><table width="620" height="250" border="0">
          
          <tr>
            <td width="90%"><h3 align="center">PAYMENT RECIEPT </h3>
            <?php 
			include'../logic/Classes/paymentHandler.php';
			include'../logic/Classes/db.php';                                    
			$pid=$_GET['pid'];
			
			$x=new DbConnect();
            $con=$x->getConnection();
			
			$rep=new PaymentHandler();
			$rep->setConnect($con);
			$result=$rep->getReport($pid);
			
			$num=mysql_num_rows($result);
		 
			
			if(!($num==0)) {?>
		
			
              <table width="100%" border="0"> 
			  <?php while($row=mysql_fetch_array($result) ) { ?>
                <tr>
                  <td width="21%"><strong>Reciept No</strong> </td>
                  <td width="27%"  background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['payment_id'];  ?></font></td>
                  <td width="23%"><strong>Date</strong></td>
                  <td width="29%" background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['date'];  ?></font></td>
                </tr>
                
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Subject</strong></td>
                  <td background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['subject'];  ?></font></td>
                  <td><strong>Grade</strong></td>
                  <td background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['grade'];  ?></font></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Fee</strong></td>
                  <td background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099">Rs.<?php echo $row['p_fee'];  ?></font></td>
                  <td><strong>Registration No</strong> </td>
                  <td background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['reg_no'];  ?></font></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                
                
                <tr>
                  <td background="images/Untitled-1.jpg" style="background-repeat:no-repeat">
                  <font size="+1" face="Cambria" color="#000099"><?php echo $row['recieved_by'];  ?></font></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td><strong>Recieved By </strong></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
              </table>
            </td>
          </tr>
           
<?php }?>
        </table>
		<?php } else{ ?> <div align="center"> <strong> <?php echo $pid; ?> </strong></div><?php } ?>
		</td>
		
	</tr>
	<tr>
		<td><table width="620" height="42" border="0">
          <tr>
            <td background="images/report_03.png"><div align="left" class="style2">
              <div align="center">-<em>Successful Path For University Entrance</em>- </div>
            </div></td>
          </tr>
        </table></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
<?php  } else { header("location:../../index.php");   }?>